Skip to content

Conversation

@jcortes
Copy link
Collaborator

@jcortes jcortes commented Mar 27, 2025

WHY

Resolves #15982

Summary by CodeRabbit

  • New Features

    • Enhanced error handling for smoother record retrieval.
    • Enabled dynamic filtering with customizable criteria for more flexible record searches.
  • Chores

    • Updated version numbers across integration components to ensure consistency and reliability.

@jcortes jcortes self-assigned this Mar 27, 2025
@vercel
Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Ignored (Inspect) Mar 27, 2025 8:35pm
pipedream-docs ⬜️ Ignored (Inspect) Mar 27, 2025 8:35pm
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Mar 27, 2025 8:35pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 27, 2025

Walkthrough

The PR updates version numbers across multiple modules and sources, introduces error handling in the listRecords method, and adds support for dynamic filtering via a new filterByFormula property and corresponding parameter modifications. The changes focus on refining record-fetching methods without altering core functionality or control flow aside from the error handling implementation.

Changes

File(s) Change Summary
components/airtable_oauth/actions/.../*.mjs Updated version numbers (e.g., "0.0.8"→"0.0.9", "0.1.0"→"0.1.1", "0.0.9"→"0.0.10", "0.0.10"→"0.0.11") without altering functionality.
components/airtable_oauth/airtable_oauth.app.mjs Added error handling in the listRecords method by wrapping the select API call in a try-catch block.
components/airtable_oauth/package.json Bumped package version from "0.4.2" to "0.4.3".
components/airtable_oauth/sources/common/common.mjs Introduced a new filterByFormula property and updated getListRecordsParams to accept dynamic filter formulas.
components/airtable_oauth/sources/.../*.mjs Updated version numbers and modified parameters (including renaming and formula additions) to support dynamic filtering in record-fetching modules.

Sequence Diagram(s)

sequenceDiagram
  participant Client as listRecords Caller
  participant App as Airtable OAuth App
  participant Airtable as Airtable API

  Client->>App: Call listRecords(params)
  App->>Airtable: Execute base(tableId).select(params)
  Airtable-->>App: Return records or trigger error
  alt Error Occurs
    App->>App: Catch error and invoke throwFormattedError()
    App-->>Client: Return error response
  else Successful
    App->>App: Process records and fetch next page
    App-->>Client: Return data array
  end
Loading

Assessment against linked issues

Objective Addressed Explanation
Implement filter formula in polling trigger ([#15982])

Suggested labels

User submitted

Suggested reviewers

  • GTFalcao

Poem

I'm a rabbit, hopping with glee,
Through version bumps and code changes, you see.
A try-catch here, a formula there,
Making sure our records are fetched with care.
With tiny paws, I celebrate this day,
Hopping along the code trail all the way!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

components/airtable_oauth/actions/create-field/create-field.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/airtable_oauth/actions/create-single-record/create-single-record.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

components/airtable_oauth/actions/create-comment/create-comment.mjs

Oops! Something went wrong! :(

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs
at packageResolve (node:internal/modules/esm/resolve:839:9)
at moduleResolve (node:internal/modules/esm/resolve:908:18)
at defaultResolve (node:internal/modules/esm/resolve:1038:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:557:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:525:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:246:38)
at ModuleJob._link (node:internal/modules/esm/module_job:126:49)

  • 23 others
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
components/airtable_oauth/actions/list-records/list-records.mjs (1)

1-10: Version Increment and Dynamic Filtering Integration Check in List Records Action

The version update to "0.0.9" has been applied as expected. Given that the PR objectives mention the introduction of dynamic filtering (via a new filterByFormula property) and error handling improvements in the record-fetching methods, please ensure that:

  • The new filtering property (likely provided via commonList.props) is correctly integrated and passed to the underlying API calls.
  • Any additional error handling logic associated with filtering or record retrieval is implemented in the referenced common modules.

A review of the commonList implementation and API integration is recommended to verify the intended behavior.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ad1c726 and ac16a73.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • components/airtable_oauth/actions/create-comment/create-comment.mjs (1 hunks)
  • components/airtable_oauth/actions/create-field/create-field.mjs (1 hunks)
  • components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs (1 hunks)
  • components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs (1 hunks)
  • components/airtable_oauth/actions/create-single-record/create-single-record.mjs (1 hunks)
  • components/airtable_oauth/actions/create-table/create-table.mjs (1 hunks)
  • components/airtable_oauth/actions/delete-record/delete-record.mjs (1 hunks)
  • components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs (1 hunks)
  • components/airtable_oauth/actions/get-record/get-record.mjs (1 hunks)
  • components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs (1 hunks)
  • components/airtable_oauth/actions/list-records/list-records.mjs (1 hunks)
  • components/airtable_oauth/actions/search-records/search-records.mjs (1 hunks)
  • components/airtable_oauth/actions/update-comment/update-comment.mjs (1 hunks)
  • components/airtable_oauth/actions/update-field/update-field.mjs (1 hunks)
  • components/airtable_oauth/actions/update-record/update-record.mjs (1 hunks)
  • components/airtable_oauth/actions/update-table/update-table.mjs (1 hunks)
  • components/airtable_oauth/airtable_oauth.app.mjs (1 hunks)
  • components/airtable_oauth/package.json (1 hunks)
  • components/airtable_oauth/sources/common/common.mjs (2 hunks)
  • components/airtable_oauth/sources/new-field/new-field.mjs (1 hunks)
  • components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs (1 hunks)
  • components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs (2 hunks)
  • components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs (1 hunks)
  • components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs (2 hunks)
  • components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs (1 hunks)
  • components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs (2 hunks)
  • components/airtable_oauth/sources/new-records/new-records.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: pnpm publish
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (30)
components/airtable_oauth/package.json (1)

1-24: Version Bump Verified in Package Manifest

The version update from "0.4.2" to "0.4.3" is correctly applied and in line with the coordinated versioning across the module. Please ensure that any dependent modules or documentation that reference this version are updated accordingly.

components/airtable_oauth/actions/update-field/update-field.mjs (1)

1-9: Version Increment Confirmed in Update Field Action

The version update to "0.0.9" is consistent with our versioning strategy. There are no changes to the core functionality, and the update is straightforward.

components/airtable_oauth/actions/get-record/get-record.mjs (1)

1-10: Version Update Verified in Get Record Action

The version bump to "0.0.10" is correct and aligns with similar updates in related modules. Please verify that all usages of this action are consistent with the new version.

components/airtable_oauth/actions/update-comment/update-comment.mjs (1)

1-8: Version Increment Confirmed in Update Comment Action

The version change from "0.0.8" to "0.0.9" is correctly applied. Since the changes are solely version-related, everything appears to be in order.

components/airtable_oauth/actions/list-records-in-view/list-records-in-view.mjs (1)

9-9: Version Update Consistency
The version was updated to "0.0.9" as part of a coordinated version bump. Please ensure that any enhancements (such as the newly introduced error handling or dynamic filtering support) implemented in shared modules (like commonList) are thoroughly tested downstream.

components/airtable_oauth/actions/create-single-record/create-single-record.mjs (1)

9-9: Coordinated Version Bump
The module version has been updated to "0.0.10", aligning with the overall update effort in related actions. No further changes in logic are present here; just verify that all integrations invoking this action are updated to reflect the new version if needed.

components/airtable_oauth/sources/new-or-modified-records/new-or-modified-records.mjs (1)

9-9: Source Version Update Verification
The module’s version has been incremented to "1.0.1". This change is consistent with other updates in the Airtable OAuth sources. Please confirm that any error handling or event-processing logic (if modified in shared methods) behaves as expected.

components/airtable_oauth/sources/new-field/new-field.mjs (1)

8-8: Version Increment Confirmation
The version has been updated from "1.0.0" to "1.0.1", keeping with the coordinated release. No functional changes are present; just confirm that downstream consumers are aware of this update if they rely on the version identifier.

components/airtable_oauth/sources/new-records/new-records.mjs (1)

8-8: Consistent Version Bump
The module’s version is now "1.0.1". This update is in line with other sources in the package. Although the PR objectives mention dynamic filtering modifications (e.g., renaming a filter parameter), this file only exhibits a version change. Please verify that any related parameter changes are correctly implemented in the appropriate modules.

components/airtable_oauth/actions/create-field/create-field.mjs (1)

8-8: Version Bump Updated to "0.1.1"

The version update is a straightforward bump and does not affect functionality. This is consistent with the coordinated versioning approach across the component.

components/airtable_oauth/actions/search-records/search-records.mjs (1)

8-8: Version Bump Updated to "0.0.11"

The version update here is purely cosmetic and maintains consistent versioning with no impact on logic or functionality.

components/airtable_oauth/actions/get-record-or-create/get-record-or-create.mjs (1)

9-9: Version Bump Updated to "0.0.10"

This update solely bumps the version number to reflect new changes without modifying any underlying functionality.

components/airtable_oauth/actions/update-record/update-record.mjs (1)

9-9: Version Bump Updated to "0.0.10"

The version field has been incremented appropriately. There are no functional changes in this update.

components/airtable_oauth/actions/create-or-update-record/create-or-update-record.mjs (1)

9-9: Version Bump Updated to "0.1.1"

The version update is consistent with the other modules. No modifications to behavior or functionality are introduced.

components/airtable_oauth/actions/update-table/update-table.mjs (1)

7-7: Version Increment Update

The version property has been updated to "0.0.9". This update aligns with the coordinated version bump across related Airtable OAuth components. Ensure that any dependencies or documentation referencing the previous version are updated accordingly.

components/airtable_oauth/actions/create-comment/create-comment.mjs (1)

7-7: Version Increment Update

The version property is updated to "0.0.9", maintaining consistency with other similar modules. No functionality changes were introduced here.

components/airtable_oauth/actions/create-multiple-records/create-multiple-records.mjs (1)

12-12: Version Increment Update

The version property has been updated to "0.0.9", which is consistent with the updates in the module. There are no functional changes in this hunk—only a version bump to reflect maintenance and minor improvements.

components/airtable_oauth/sources/new-or-modified-field/new-or-modified-field.mjs (1)

9-9: Module Version Bump

The version number has been incremented to "1.0.1". This minor update suggests bug fixes or small improvements. Please verify that any changes (if present) are accordingly documented and that integrations depending on this module are properly notified.

components/airtable_oauth/sources/new-modified-or-deleted-records-instant/new-modified-or-deleted-records-instant.mjs (1)

11-11: Version Increment Update

The version number for this source has been incremented to "0.1.1". The change is straightforward and consistent with the overall versioning strategy across the Airtable OAuth components. Ensure that any new error handling or filtering logic (if part of this PR) is adequately tested and documented.

components/airtable_oauth/actions/delete-record/delete-record.mjs (1)

8-8: Version increment looks good

Version has been updated from "0.0.8" to "0.0.9" as part of a coordinated version increment across multiple components in the PR.

components/airtable_oauth/actions/create-table/create-table.mjs (1)

7-7: Version increment looks good

Version has been updated from "0.0.8" to "0.0.9" as part of a coordinated version increment across multiple components in the PR.

components/airtable_oauth/sources/new-records-in-view/new-records-in-view.mjs (2)

9-9: Version increment looks good

Version has been updated from "0.0.9" to "0.0.10" as part of a coordinated version increment across the source components in the PR.


54-54: Parameter renamed to standard format

The parameter has been renamed from filterByFormula to formula while maintaining the same functionality. This change standardizes the parameter naming across the codebase.

components/airtable_oauth/sources/new-or-modified-records-in-view/new-or-modified-records-in-view.mjs (2)

9-9: Version increment looks good

Version has been updated from "0.0.10" to "0.0.11" as part of a coordinated version increment across the source components in the PR.


53-53: Parameter renamed to standard format

The parameter has been renamed from filterByFormula to formula while maintaining the same functionality. This change standardizes the parameter naming across the codebase while using the LAST_MODIFIED_TIME() formula to filter records.

components/airtable_oauth/sources/new-modified-or-deleted-records/new-modified-or-deleted-records.mjs (2)

9-9: Version update looks good

Version number has been properly incremented from 0.0.9 to 0.0.10 to reflect the changes in this component.


55-58: Good optimization for fetching modified records

The addition of a formula parameter to filter records based on their last modified time is an effective optimization, especially for large tables. This ensures only records that have been modified since the last check are retrieved.

components/airtable_oauth/sources/common/common.mjs (2)

20-25: Good addition of filterByFormula property

Adding the filterByFormula property allows users to define custom filter conditions when configuring the source, enhancing the component's flexibility.


51-64: Well-implemented formula handling logic

The updated getListRecordsParams method now properly handles formula parameters and combines them with user-defined filter formulas using the Airtable AND() function. This implementation enhances the filtering capabilities while maintaining backward compatibility.

components/airtable_oauth/airtable_oauth.app.mjs (1)

285-300: Improved error handling in listRecords method

Adding a try-catch block around the Airtable record selection is a good practice for error handling. This ensures that any failures during record retrieval are properly caught and formatted through the throwFormattedError method, improving the component's robustness.

Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jcortes jcortes merged commit 12a7e8c into master Mar 28, 2025
11 checks passed
@jcortes jcortes deleted the airtable-polling-trigger-with-filter branch March 28, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TRIGGER] Airtable Polling Trigger with filter

3 participants